package com.distribute.framework.model;

import com.distribute.framework.core.web.helper.Utils;
import java.lang.reflect.Field;
import java.util.Date; 
import java.util.Map;
import java.util.HashMap;
import java.util.List;
import java.util.ArrayList;

import javax.annotation.Resource;

import com.distribute.framework.core.web.util.Page;
import com.distribute.framework.core.lang.*; 
import com.distribute.framework.core.web.helper.WebHelper.LzMap;
import com.distribute.framework.core.util.Function;
import com.distribute.framework.core.util.IbatisMap;
import com.distribute.framework.config.*;
import com.distribute.framework.plugin.*;

@namespace("systematic/log")
public @caption("系统日志") @database(DatabaseNames.distribute_data) @source("distribute_data") @table("srv_log") class SrvLog implements java.io.Serializable
{
	private static final long serialVersionUID = 1l;
	private @caption("编号") @column("sl_id")    @primary  @notnull  @note("  ") Long slId;// 主键 非空     
	private @caption("域") @column("sl_host")      @relate("$slHost") @RelateClass(SrvHost.class)  @note("  ") Long slHost;//     
 	private transient SrvHost $slHost;//关联对象[授权商户]
	private @caption("操作名称") @column("sl_name") @like    @notnull  @note("  ") String slName;// 非空     
	private @caption("操作模块") @column("sl_model")      @relate("$slModel") @RelateClass(SrvProperty.class)  @note("  ") Long slModel;//    model_class:系统数据模型类 
 	private transient SrvProperty $slModel;//关联对象[系统属性]
	private @caption("操作类型") @column("sl_type")      @relate("$slType") @RelateClass(SrvProperty.class)  @note("  ") Long slType;//    log_type:日志操作类型 
 	private transient SrvProperty $slType;//关联对象[系统属性]
	private @caption("操作人") @column("sl_user")     @notnull  @relate("$slUser") @RelateClass(SrvUser.class)  @note("  ") Long slUser;// 非空     
 	private transient SrvUser $slUser;//关联对象[人员信息]
	private @caption("模块类名") @column("sl_class")      @note("  ") String slClass;//     
	private @caption("数据ID") @column("sl_relate")      @note("  ") Long slRelate;//     
	private @caption("数据状态") @column("sl_detail") @like     @note("  ") String slDetail;//     
	private @caption("操作时间") @column("sl_add_time")     @notnull  @note("  ") Date slAddTime;// 非空     
	 
	//默认构造函数
	public SrvLog(){ 
	
	}
	
	//主键构造函数
	public SrvLog(Long id){
		this.slId = id;
	}
	
	/**所有字段构造函数 
	 SrvLog(
	 	Utils.getLong("slHost")//域
	 	,Utils.getString("slName")//操作名称 [非空]
	 	,Utils.getLong("slModel")//操作模块
	 	,Utils.getLong("slType")//操作类型
	 	,Utils.getLong("slUser")//操作人 [非空]
	 	,Utils.getString("slClass")//模块类名
	 	,Utils.getLong("slRelate")//数据ID
	 	,Utils.getString("slDetail")//数据状态
	 	,Utils.getDate("slAddTime")//操作时间 [非空]
	 )
	**/
	public SrvLog(Long slHost,String slName,Long slModel,Long slType,Long slUser,String slClass,Long slRelate,String slDetail,Date slAddTime){
		this.slHost=slHost;
		this.slName=slName;
		this.slModel=slModel;
		this.slType=slType;
		this.slUser=slUser;
		this.slClass=slClass;
		this.slRelate=slRelate;
		this.slDetail=slDetail;
		this.slAddTime=slAddTime;
	}
	
	//设置非空字段
	public SrvLog setNotNull(String slName,Long slUser,Date slAddTime){
		this.slName=slName;
		this.slUser=slUser;
		this.slAddTime=slAddTime;
		return this;
	}
	/** 编号 [非空]       **/
	public SrvLog slId(Long slId){
		this.slId = slId;
		this.setSeted(F.slId);
		return this;
	}
	/** 域  [SrvHost]      **/
	public SrvLog slHost(Long slHost){
		this.slHost = slHost;
		this.setSeted(F.slHost);
		return this;
	}
	/** 操作名称 [非空]       **/
	public SrvLog slName(String slName){
		this.slName = slName;
		this.setSeted(F.slName);
		return this;
	}
	/** 操作模块  [SrvProperty]     model_class:系统数据模型类 **/
	public SrvLog slModel(Long slModel){
		this.slModel = slModel;
		this.setSeted(F.slModel);
		return this;
	}
	/** 操作类型  [SrvProperty]     log_type:日志操作类型 **/
	public SrvLog slType(Long slType){
		this.slType = slType;
		this.setSeted(F.slType);
		return this;
	}
	/** 操作人 [非空] [SrvUser]      **/
	public SrvLog slUser(Long slUser){
		this.slUser = slUser;
		this.setSeted(F.slUser);
		return this;
	}
	/** 模块类名        **/
	public SrvLog slClass(String slClass){
		this.slClass = slClass;
		this.setSeted(F.slClass);
		return this;
	}
	/** 数据ID        **/
	public SrvLog slRelate(Long slRelate){
		this.slRelate = slRelate;
		this.setSeted(F.slRelate);
		return this;
	}
	/** 数据状态        **/
	public SrvLog slDetail(String slDetail){
		this.slDetail = slDetail;
		this.setSeted(F.slDetail);
		return this;
	}
	/** 操作时间 [非空]       **/
	public SrvLog slAddTime(Date slAddTime){
		this.slAddTime = slAddTime;
		this.setSeted(F.slAddTime);
		return this;
	}
	
	
	/**
	* 克隆对象
	**/
	public SrvLog clone(){
		SrvLog clone = new SrvLog();
		clone.slHost=this.slHost;
		clone.slName=this.slName;
		clone.slModel=this.slModel;
		clone.slType=this.slType;
		clone.slUser=this.slUser;
		clone.slClass=this.slClass;
		clone.slRelate=this.slRelate;
		clone.slDetail=this.slDetail;
		clone.slAddTime=this.slAddTime;
		return clone;
	}
	
	
	/**
	 * 根据ID取系统日志
	 * @param id
	 * @return
	 */
	public static @api SrvLog get(Long id){		
		return getSrvLogById(id);
	}
	/**
	 * 设置ID
	 * @param id
	 * @return
	 */
	public void setId(Long id){		
		this.slId = id;
	}
	
	/**
	 * 获取所有系统日志
	 * @return
	 */
	public static @api List<SrvLog> list(Map params,Integer size){
		return getSrvLogList(params,size);
	}
	/**
	 * 获取系统日志分页
	 * @return
	 */
	public static @api Page<SrvLog> page(Integer page,Integer size,Map params){
		return getSrvLogPage(page, size , params);
	}
	
	
	/**
	 * 根据查询条件取系统日志
	 * @param params
	 * @return
	 */
	public static @api SrvLog Get(Map params){
		return getSrvLog(params);
	}
	/**
	 * 获取系统日志数
	 * @return
	 */
	public static @api Long count(Map params){
		return getSrvLogCount(params);
	}
	/**
	 * 获取系统日志数
	 * @return
	 */
	public static @api <T> T eval(String eval,Map params){
		return getSrvLogEval(eval,params);
	}
	
	/**
	 * 根据ID取系统日志
	 * @param id
	 * @return
	 */
	public static @api SrvLog getSrvLogById(Long id){		
		return getSrvLogDao().getSrvLogById(id);
	}
	/**
	 * 获取id
	 * @return
	 */
	public Long getId(){
		return this.slId;
	}
	
	
	/**
	 * 根据ID取系统日志的标识键值
	 * @param id
	 * @return
	 */
	public static @api String getKeyValue(Object key){
		Long id = Utils.parseLong(key);	
		if(id==null || id.longValue()==0 ){
			return null;
		}
		String value = null;
		if(value==null){
			SrvLog srvLog = get(id);
			if(srvLog!=null){
				String strValue = srvLog.getSlName$();
				if(!"SlName".equals("SlName"))
					strValue+="("+srvLog.getSlName$()+")";
				value = strValue;
			}else{
				value = "{"+id+"}";
			}
		}
		/************LAZY3Q_ID_KEYVALUE************/
		/************LAZY3Q_ID_KEYVALUE************/
		return value;
	}	
	
	
	/**
	 * 获取当前对象的键值
	 * @return
	 */
	public String getKeyValue(){
		/************LAZY3Q_CODE_KEYVALUE************/
		/************LAZY3Q_CODE_KEYVALUE************/
		String keyValue = this.getSlName$();
		if(!"SlName".equals("SlName"))
			keyValue+="("+this.getSlName$()+")";
		return keyValue;
	}
	
	
	/**
	 * 根据关键字精确查询系统日志对象
	 * @return
	 */
	public static @api SrvLog find(String key){
		if(Utils.empty(key))return null;
		Map params = new HashMap();
		if(key.toLowerCase().startsWith("id:"))//如果查询条件以id:开头，则按ID查询
			params.put("slId", key.toLowerCase().replaceFirst("id:", ""));					
		else{//按标识查询，精确查询
			String strDefinex = "";
			strDefinex+=" or sl_name = '"+key.replaceAll("'", "''")+"'";
			strDefinex="(2=1 "+strDefinex+")";
			params.put("definex",strDefinex);
		}
		/************LAZY3Q_CODE_FIND************/
		/************LAZY3Q_CODE_FIND************/
		return SrvLog.getSrvLog(params);
	}
	
	
	/**
	 * 根据关键字查询系统日志
	 * @return
	 */
	public static @api List<Map> query(String key,int size,Map params,Boolean bObject){
		if(Utils.empty((String)params.get("asc")) && Utils.empty((String)params.get("desc")))//如果未传入排序字段
			params.put("desc","sl_id");//那么，默认以主键降序，传给Dao层
		String strTerm=key;		
		if(!Utils.empty(strTerm)){
			if(strTerm.toLowerCase().startsWith("id:"))//如果查询条件以id:开头，则按ID查询
				params.put("slId", strTerm.toLowerCase().replaceFirst("id:", ""));					
			else//按标识查询，模糊查询请带%
			{
				String strDefinex = "";
				strDefinex+=" or sl_name like '%"+strTerm.replaceAll("'", "''")+"%'";
				strDefinex="(2=1 "+strDefinex+")";
				params.put("definex",strDefinex);
			}
		}
		/************LAZY3Q_CODE_QUERY************/
		/************LAZY3Q_CODE_QUERY************/
			
		List<SrvLog> list = page(0,size,params).getResult();
		
		/**
		* OK!取到数据拼成放入Map中，[{value,text,object:{...}},...]
		* value:数据ID，text:数据标识,object,整个对象
		**/
		List<Map> result = new java.util.ArrayList();
		for(SrvLog srvLog:list){
			Map map = new HashMap();
			map.put("key",srvLog.getSlId().toString());
			map.put("value", Utils.js(srvLog.getKeyValue()));
			if(bObject==true)
				map.put("object",srvLog);
			result.add(map);
		}
		/************LAZY3Q_AFTER_QUERY************/
		/************LAZY3Q_AFTER_QUERY************/
		
		return result;
	}
	
	
	
	/**
	 * 获取所有系统日志
	 * @return
	 */
	public static @api List<SrvLog> getSrvLogList(Map params,Integer size){
		return getSrvLogDao().getSrvLogList(params,0,size);
	}
	
	/**
	 * 获取系统日志分页
	 * @return
	 */
	public static @api Page<SrvLog> getSrvLogPage(Integer page,Integer size,Map params){
		if(page==null)page=0;
		if(size==null)size=20;
		return getSrvLogDao().getSrvLogPage(page, size , params);
	}
	
	/**
	 * 根据查询条件取系统日志
	 * @param params
	 * @return
	 */
	public static @api SrvLog getSrvLog(Map params){
		return getSrvLogDao().getSrvLog(params);
	}
	
	/**
	 * 保存一个系统日志
	 * @param srvLog
	 * @return
	 */
	public static @api SrvLog saveSrvLog(SrvLog srvLog){
		return getSrvLogDao().saveSrvLog(srvLog);
	}
	
	/**
	 * 根据条件更新系统日志
	 * @param values
	 * @param params
	 */
	public static @api int updateSrvLogByConfirm(Map values, Map params){
		return getSrvLogDao().updateSrvLogByConfirm(values,params);
	}
	
	/**
	 * 修改一个系统日志
	 * @param srvLog
	 * @return
	 */
	public static @api int updateSrvLog(SrvLog srvLog){
		return getSrvLogDao().updateSrvLog(srvLog);
	}
	
	/**
	 * 更新系统日志非空字段
	 * @param srvLog
	 */
	public static @api int updateSrvLog$NotNull(SrvLog srvLog){
		return getSrvLogDao().updateSrvLog$NotNull(srvLog);
	}
	
	/**
	 * 获取系统日志数
	 * @return
	 */
	public static @api Long getSrvLogCount(Map params){
		return getSrvLogDao().getSrvLogCount(params);
	}
		
		
	/**
	 * 获取系统日志自定义求和表达式,比如求和:eval="sum(id)"
	 * @return
	 */	
	public static @api <T> T getSrvLogEval(String eval,Map params){
		return getSrvLogDao().getSrvLogEval(eval,params);
	}
	
	/**
	 * 根据条件更新数据
	 * @param set
	 * @param where
	 */
	public static int updateSrvLog(Map set,Map where){
		if(set.isEmpty())throw new RuntimeException("set为空");
		if(where.isEmpty())throw new RuntimeException("where为空");
		where.put("confirm", "1");
		return getSrvLogDao().updateSrvLogByConfirm(set, where);
	}
	
	
	/**
	 * 根据条件更新数据
	 * @param set
	 * @param where
	 */
	public static void deleteSrvLog(Map where){
		if(where.isEmpty())throw new RuntimeException("where为空");
		where.put("confirm", "1");
		getSrvLogDao().deleteSrvLogByConfirm(where);
	}
	
	/**
	 * 根据条件更新数据
	 * @param set
	 * @param where
	 */
	public static void delete(Long id){
		if(id==null)throw new RuntimeException("id为空");
		getSrvLogDao().deleteSrvLogById(id);
	}
	
	
	/**
	 * 保存系统日志对象
	 * @param params
	 * @return
	 */
	public SrvLog save(){
		if(this.getSlId()!=null)
			getSrvLogDao().updateSrvLog(this);
		else
			return getSrvLogDao().saveSrvLog(this);
		return this;
	}
	
	
	/**
	 * 更新系统日志对象的非空字段,注意跟Service里面的update不一样哦
	 * @param params
	 * @return
	 */
	public int update(){
		return getSrvLogDao().updateSrvLog$NotNull(this);
	}
	
	
	/**
	 * 删除
	 * @param params
	 * @return
	 */
	public void delete(){
			getSrvLogDao().deleteSrvLogById(this.getSlId());
	}
	
	/**
	 * 执行事务
	 * @param function
	 */
	public static <T> T execute(Function function){
		return getSrvLogDao().executeTransaction(function);
	}
	/*******************************编号**********************************/	
	/**
	* 编号 [非空]      
	**/
	public Long getSlId(){
		if(this.slId!=null){
			return this.slId;
		}
		return this.slId;
	}
	/**
	* 获取编号格式化(toString)
	**/
	public String getSlId$(){
		String strValue="";
		 strValue=Utils.string(this.getSlId());
	 	 return strValue;
	}
	/**
	* 根据编号反格式化
	**/
	public void setSlId$(String strValue){
		if(Utils.empty(strValue)){
			this.slId=null;
			return;
		}
	 	this.slId=Utils.parseLong(strValue);
	}
	
	/**
	* 编号 [非空]      
	**/
	public void setSlId(Long slId){
		this.slId = slId;
		this.setSeted(F.slId);
	}
	
	
	
	
	/*******************************域**********************************/	
	/**
	* 域  [SrvHost]     
	**/
	public Long getSlHost(){
		if(this.slHost!=null){
			return this.slHost;
		}
		return this.slHost;
	}
	/**
	* 获取域格式化(toString)
	**/
	public String getSlHost$(){
		String strValue="";
		if(this.getSlHost()!=null){
				strValue+=Utils.string(SrvHost.getKeyValue(this.getSlHost()));
		}			
	 	 return strValue;
	}
	/**
	* 根据域反格式化
	**/
	public void setSlHost$(String strValue){
		if(Utils.empty(strValue)){
			this.slHost=null;
			return;
		}
		SrvHost item = SrvHost.find(strValue);
		if(item!=null){
			this.slHost = Utils.parseLong(item.getShId());
		}
	}
	
	/**
	* 域  [SrvHost]     
	**/
	public void setSlHost(Long slHost){
		this.slHost = slHost;
		this.setSeted(F.slHost);
	}
	
	
	
	
	/**
	* 获取关联对象[授权商户]
	**/	 			
 	public SrvHost get$slHost(){
 		if(this.$slHost!=null)
 			return this.$slHost;
 		com.distribute.framework.model.SrvHost srvHost = null;
		if(this.getSlHost()!=null){
 			srvHost = SrvHost.get(this.getSlHost());
 		}
 		return srvHost;
	}
	/*******************************操作名称**********************************/	
	/**
	* 操作名称 [非空]      
	**/
	public String getSlName(){
		if(this.slName!=null){
			return this.slName;
		}
		return this.slName;
	}
	/**
	* 获取操作名称格式化(toString)
	**/
	public String getSlName$(){
		String strValue="";
		 strValue=Utils.string(this.getSlName());
	 	 return strValue;
	}
	/**
	* 根据操作名称反格式化
	**/
	public void setSlName$(String strValue){
		if(Utils.empty(strValue)){
			this.slName=null;
			return;
		}
	 	this.slName=strValue;
	}
	
	/**
	* 操作名称 [非空]      
	**/
	public void setSlName(String slName){
		this.slName = slName;
		this.setSeted(F.slName);
	}
	
	
	
	
	/*******************************操作模块**********************************/	
	/**
	* 操作模块  [SrvProperty]     model_class:系统数据模型类
	**/
	public Long getSlModel(){
		if(this.slModel!=null){
			return this.slModel;
		}
		return this.slModel;
	}
	/**
	* 获取操作模块格式化(toString)
	**/
	public String getSlModel$(){
		String strValue="";
		if(this.getSlModel()!=null){
				strValue+=Utils.string(SrvProperty.getKeyValue(this.getSlModel()));
		}			
	 	 return strValue;
	}
	/**
	* 根据操作模块反格式化
	**/
	public void setSlModel$(String strValue){
		if(Utils.empty(strValue)){
			this.slModel=null;
			return;
		}
		SrvProperty item = SrvProperty.find(strValue);
		if(item!=null){
			this.slModel = Utils.parseLong(item.getSpId());
		}
	}
	
	/**
	* 操作模块  [SrvProperty]     model_class:系统数据模型类
	**/
	public void setSlModel(Long slModel){
		this.slModel = slModel;
		this.setSeted(F.slModel);
	}
	
	
	
		
	/**
	* 动态创建[操作模块]对应的属性值
	**/	 			
 	public static SrvProperty getSlModel(String flag,String title){
 		SrvProperty root = SrvProperty.where.spFlag("model_class").get();
		if(root==null)//如果不存在则创建一个
			root = new SrvProperty().spParent(0l).spFlag("model_class").spName("系统数据模型类").spStatus((short) 1).save();
		SrvProperty property = SrvProperty.where.spFlag(flag).spParent(root.getId()).get();
		if(property==null)
			property = new SrvProperty().spParent(root.getId()).spFlag(flag).spName(title).spStatus((short) 1).save();
		return property;
	}
	/**
	* 获取关联对象[系统属性]
	**/	 			
 	public SrvProperty get$slModel(){
 		if(this.$slModel!=null)
 			return this.$slModel;
 		com.distribute.framework.model.SrvProperty srvProperty = null;
		if(this.getSlModel()!=null){
 			srvProperty = SrvProperty.get(this.getSlModel());
 		}
 		return srvProperty;
	}
	/*******************************操作类型**********************************/	
	/**
	* 操作类型  [SrvProperty]     log_type:日志操作类型
	**/
	public Long getSlType(){
		if(this.slType!=null){
			return this.slType;
		}
		return this.slType;
	}
	/**
	* 获取操作类型格式化(toString)
	**/
	public String getSlType$(){
		String strValue="";
		if(this.getSlType()!=null){
				strValue+=Utils.string(SrvProperty.getKeyValue(this.getSlType()));
		}			
	 	 return strValue;
	}
	/**
	* 根据操作类型反格式化
	**/
	public void setSlType$(String strValue){
		if(Utils.empty(strValue)){
			this.slType=null;
			return;
		}
		SrvProperty item = SrvProperty.find(strValue);
		if(item!=null){
			this.slType = Utils.parseLong(item.getSpId());
		}
	}
	
	/**
	* 操作类型  [SrvProperty]     log_type:日志操作类型
	**/
	public void setSlType(Long slType){
		this.slType = slType;
		this.setSeted(F.slType);
	}
	
	
	
		
	/**
	* 动态创建[操作类型]对应的属性值
	**/	 			
 	public static SrvProperty getSlType(String flag,String title){
 		SrvProperty root = SrvProperty.where.spFlag("log_type").get();
		if(root==null)//如果不存在则创建一个
			root = new SrvProperty().spParent(0l).spFlag("log_type").spName("日志操作类型").spStatus((short) 1).save();
		SrvProperty property = SrvProperty.where.spFlag(flag).spParent(root.getId()).get();
		if(property==null)
			property = new SrvProperty().spParent(root.getId()).spFlag(flag).spName(title).spStatus((short) 1).save();
		return property;
	}
	/**
	* 获取关联对象[系统属性]
	**/	 			
 	public SrvProperty get$slType(){
 		if(this.$slType!=null)
 			return this.$slType;
 		com.distribute.framework.model.SrvProperty srvProperty = null;
		if(this.getSlType()!=null){
 			srvProperty = SrvProperty.get(this.getSlType());
 		}
 		return srvProperty;
	}
	/*******************************操作人**********************************/	
	/**
	* 操作人 [非空] [SrvUser]     
	**/
	public Long getSlUser(){
		if(this.slUser!=null){
			return this.slUser;
		}
		return this.slUser;
	}
	/**
	* 获取操作人格式化(toString)
	**/
	public String getSlUser$(){
		String strValue="";
		if(this.getSlUser()!=null){
				strValue+=Utils.string(SrvUser.getKeyValue(this.getSlUser()));
		}			
	 	 return strValue;
	}
	/**
	* 根据操作人反格式化
	**/
	public void setSlUser$(String strValue){
		if(Utils.empty(strValue)){
			this.slUser=null;
			return;
		}
		SrvUser item = SrvUser.find(strValue);
		if(item!=null){
			this.slUser = Utils.parseLong(item.getSuId());
		}
	}
	
	/**
	* 操作人 [非空] [SrvUser]     
	**/
	public void setSlUser(Long slUser){
		this.slUser = slUser;
		this.setSeted(F.slUser);
	}
	
	
	
	
	/**
	* 获取关联对象[人员信息]
	**/	 			
 	public SrvUser get$slUser(){
 		if(this.$slUser!=null)
 			return this.$slUser;
 		com.distribute.framework.model.SrvUser srvUser = null;
		if(this.getSlUser()!=null){
 			srvUser = SrvUser.get(this.getSlUser());
 		}
 		return srvUser;
	}
	/*******************************模块类名**********************************/	
	/**
	* 模块类名       
	**/
	public String getSlClass(){
		if(this.slClass!=null){
			return this.slClass;
		}
		return this.slClass;
	}
	/**
	* 获取模块类名格式化(toString)
	**/
	public String getSlClass$(){
		String strValue="";
		 strValue=Utils.string(this.getSlClass());
	 	 return strValue;
	}
	/**
	* 根据模块类名反格式化
	**/
	public void setSlClass$(String strValue){
		if(Utils.empty(strValue)){
			this.slClass=null;
			return;
		}
	 	this.slClass=strValue;
	}
	
	/**
	* 模块类名       
	**/
	public void setSlClass(String slClass){
		this.slClass = slClass;
		this.setSeted(F.slClass);
	}
	
	
	
	
	/*******************************数据ID**********************************/	
	/**
	* 数据ID       
	**/
	public Long getSlRelate(){
		if(this.slRelate!=null){
			return this.slRelate;
		}
		return this.slRelate;
	}
	/**
	* 获取数据ID格式化(toString)
	**/
	public String getSlRelate$(){
		String strValue="";
		 strValue=Utils.string(this.getSlRelate());
	 	 return strValue;
	}
	/**
	* 根据数据ID反格式化
	**/
	public void setSlRelate$(String strValue){
		if(Utils.empty(strValue)){
			this.slRelate=null;
			return;
		}
	 	this.slRelate=Utils.parseLong(strValue);
	}
	
	/**
	* 数据ID       
	**/
	public void setSlRelate(Long slRelate){
		this.slRelate = slRelate;
		this.setSeted(F.slRelate);
	}
	
	
	
	
	/*******************************数据状态**********************************/	
	/**
	* 数据状态       
	**/
	public String getSlDetail(){
		if(this.slDetail!=null){
			return this.slDetail;
		}
		return this.slDetail;
	}
	/**
	* 获取数据状态格式化(toString)
	**/
	public String getSlDetail$(){
		String strValue="";
		 strValue=Utils.string(this.getSlDetail());
	 	 return strValue;
	}
	/**
	* 根据数据状态反格式化
	**/
	public void setSlDetail$(String strValue){
		if(Utils.empty(strValue)){
			this.slDetail=null;
			return;
		}
		this.slDetail=strValue;
	}
	
	/**
	* 数据状态       
	**/
	public void setSlDetail(String slDetail){
		this.slDetail = slDetail;
		this.setSeted(F.slDetail);
	}
	
	
	
	
	/*******************************操作时间**********************************/	
	/**
	* 操作时间 [非空]      
	**/
	public Date getSlAddTime(){
		if(this.slAddTime!=null){
			return this.slAddTime;
		}
		return this.slAddTime;
	}
	/**
	* 获取操作时间格式化(toString)
	**/
	public String getSlAddTime$(){
		String strValue="";
		 strValue=Utils.string(Utils.date(this.getSlAddTime(),"yyyy-MM-dd HH:mm:ss"));
	 	 return strValue;
	}
	/**
	* 根据操作时间反格式化
	**/
	public void setSlAddTime$(String strValue){
		if(Utils.empty(strValue)){
			this.slAddTime=null;
			return;
		}
	 	this.slAddTime=Utils.date(strValue,"yyyy-MM-dd HH:mm:ss");
	}
	
	/**
	* 操作时间 [非空]      
	**/
	public void setSlAddTime(Date slAddTime){
		this.slAddTime = slAddTime;
		this.setSeted(F.slAddTime);
	}
	
	
	
	
	/************LAZY3Q_DEFINE_CODE************/
	/************LAZY3Q_DEFINE_CODE************/
	
	
	/**
	 * 触发器
	 */
	public static void on(Trigger.Index index,final Notify.Listener listener,Trigger.Type... types){
		Notify.on(SrvLog.class, index, listener, types);
	}
	public static void on(final Notify.Listener listener,String type){
		Notify.on(SrvLog.class, listener, type);
	}
	/**
	 * 当修改字段时
	 * @param filedName
	 * @param listener
	 */
	public static void on(String filedName,final Notify.Listener listener){
		Notify.on(SrvLog.class, listener, filedName);
	}
	/**
	 * 当修改字段为某值时
	 * @param filedName
	 * @param value
	 * @param listener
	 */
	public static void on(String filedName,Object value,final Notify.Listener listener){
		if(value==null)return;
		Notify.on(SrvLog.class, listener, filedName+"."+Utils.md5(""+value));
	}
	public void notify(String type){
		Trigger.on(SrvLog.class,type, this);
	}
	
	
	/**
	 * 用来获取当有字段关联对象时的获取方式,调用如${SrvLog.obj.filedName}
	 * 因为有些变态的模板语言不能识别$，所以不能以${SrvLog.$filedName}获取关联对象
	 */
	public Map getObj(){
		return new HashMap(){
			@Override
			public Object get(Object key) {
				try {
					return SrvLog.class.getMethod("get$"+Utils.forMat(key.toString())).invoke(SrvLog.this);
				} catch (Exception e) {
					e.printStackTrace();
				}
				return null;
			}
		};
	}
	/**
	 * 用来获取某字段格式化的获取方式,调用如${SrvLog.fmt.filedName}
	 * 因为有些变态的模板语言不能识别$，所以不能以${SrvLog.filedName$}获取某字段格式化
	 */
	public Map getFmt(){
		return new HashMap(){
			@Override
			public Object get(Object key) {
				try {
					return SrvLog.class.getMethod("get"+Utils.ForMat(key.toString()+"$")).invoke(SrvLog.this);
				} catch (Exception e) {
					e.printStackTrace();
				}
				return null;
			}
		};
	}
	/**
	 * 获取查询参数链式串
	 * @return
	 */
	public static @Deprecated M where(){ return new M(0); }
	public static @Deprecated M m(){ return new M(0); }
	public static M where = new M(0,true);
	public static @database(DatabaseNames.distribute_data) class M extends IbatisMap{
		int type = 0; 
		M linked = null;
		Boolean proxy = false;
		public M set = null;
		public M(int type){
			this.type = type;
			if(this.type==0){
				set = new M(1,true);
				set.linked = this;
			}
		};
		public M(int type,Boolean proxy){
			this.type = type;
			this.proxy=proxy;
		};
		public M proxy(){
			M m = new M(this.type);//当前的对像
			if(this.type==0){
				m.set = new M(1,true);//set对象
				m.set.linked = m;
			}else{
				m.linked=this.linked;
				this.linked.linked=m;
			}
			return m;
		}
		public @Deprecated M set(){			
			M m = this;
			m.linked=new M(1);
			m.linked.linked=m;
			return m.linked;
		};
		/** 编号 [非空]       **/
		public M slId(Object slId){if(proxy)return proxy().slId(slId);  this.put("slId", slId);return this;};
	 	/** and sl_id is null */
 		public M slIdNull(){if(proxy)return proxy().slIdNull();if(this.get("slIdNot")==null)this.put("slIdNot", "");this.put("slId", null);return this;};
 		/** not .... */
 		public M slIdNot(){if(proxy)return proxy().slIdNot();this.put("slIdNot", "not");return this;};
 		public M slIdNotNull(){if(proxy)return proxy().slIdNotNull();this.put("slIdNot", "not");this.put("slId", null);return this;};
 		public M slIdNot(Object slId){if(proxy)return proxy().slIdNot(slId);this.put("slIdNot", "not");this.put("slId", slId);return this;};
		/** and sl_id <= ? */
		public M slIdMin(Object min){if(proxy)return proxy().slIdMin(min);this.put("slIdMin", min);return this;};
		/** and sl_id >= ? */
		public M slIdMax(Object max){if(proxy)return proxy().slIdMax(max);this.put("slIdMax", max);return this;};
		public M slIdIn(String ids){
			if(proxy)return proxy().slIdIn(ids);  this.put("slIdIn", ids);return this;
		};	
		/** 域  [SrvHost]      **/
		public M slHost(Object slHost){if(proxy)return proxy().slHost(slHost);  this.put("slHost", slHost);return this;};
	 	/** and sl_host is null */
 		public M slHostNull(){if(proxy)return proxy().slHostNull();if(this.get("slHostNot")==null)this.put("slHostNot", "");this.put("slHost", null);return this;};
 		/** not .... */
 		public M slHostNot(){if(proxy)return proxy().slHostNot();this.put("slHostNot", "not");return this;};
 		public M slHostNotNull(){if(proxy)return proxy().slHostNotNull();this.put("slHostNot", "not");this.put("slHost", null);return this;};
 		public M slHostNot(Object slHost){if(proxy)return proxy().slHostNot(slHost);this.put("slHostNot", "not");this.put("slHost", slHost);return this;};
		public M slHostIn(String ids){
			if(proxy)return proxy().slHostIn(ids);  this.put("slHostIn", ids);return this;
		};	
		/** 操作名称 [非空]       **/
		public M slName(Object slName){if(proxy)return proxy().slName(slName);  this.put("slName", slName);return this;};
	 	/** and sl_name is null */
 		public M slNameNull(){if(proxy)return proxy().slNameNull();if(this.get("slNameNot")==null)this.put("slNameNot", "");this.put("slName", null);return this;};
 		/** not .... */
 		public M slNameNot(){if(proxy)return proxy().slNameNot();this.put("slNameNot", "not");return this;};
 		public M slNameNotNull(){if(proxy)return proxy().slNameNotNull();this.put("slNameNot", "not");this.put("slName", null);return this;};
 		public M slNameNot(Object slName){if(proxy)return proxy().slNameNot(slName);this.put("slNameNot", "not");this.put("slName", slName);return this;};
		/** 操作模块  [SrvProperty]     model_class:系统数据模型类 **/
		public M slModel(Object slModel){if(proxy)return proxy().slModel(slModel);  this.put("slModel", slModel);return this;};
	 	/** and sl_model is null */
 		public M slModelNull(){if(proxy)return proxy().slModelNull();if(this.get("slModelNot")==null)this.put("slModelNot", "");this.put("slModel", null);return this;};
 		/** not .... */
 		public M slModelNot(){if(proxy)return proxy().slModelNot();this.put("slModelNot", "not");return this;};
 		public M slModelNotNull(){if(proxy)return proxy().slModelNotNull();this.put("slModelNot", "not");this.put("slModel", null);return this;};
 		public M slModelNot(Object slModel){if(proxy)return proxy().slModelNot(slModel);this.put("slModelNot", "not");this.put("slModel", slModel);return this;};
		public M slModelIn(String ids){
			if(proxy)return proxy().slModelIn(ids);  this.put("slModelIn", ids);return this;
		};	
		/** 操作类型  [SrvProperty]     log_type:日志操作类型 **/
		public M slType(Object slType){if(proxy)return proxy().slType(slType);  this.put("slType", slType);return this;};
	 	/** and sl_type is null */
 		public M slTypeNull(){if(proxy)return proxy().slTypeNull();if(this.get("slTypeNot")==null)this.put("slTypeNot", "");this.put("slType", null);return this;};
 		/** not .... */
 		public M slTypeNot(){if(proxy)return proxy().slTypeNot();this.put("slTypeNot", "not");return this;};
 		public M slTypeNotNull(){if(proxy)return proxy().slTypeNotNull();this.put("slTypeNot", "not");this.put("slType", null);return this;};
 		public M slTypeNot(Object slType){if(proxy)return proxy().slTypeNot(slType);this.put("slTypeNot", "not");this.put("slType", slType);return this;};
		public M slTypeIn(String ids){
			if(proxy)return proxy().slTypeIn(ids);  this.put("slTypeIn", ids);return this;
		};	
		/** 操作人 [非空] [SrvUser]      **/
		public M slUser(Object slUser){if(proxy)return proxy().slUser(slUser);  this.put("slUser", slUser);return this;};
	 	/** and sl_user is null */
 		public M slUserNull(){if(proxy)return proxy().slUserNull();if(this.get("slUserNot")==null)this.put("slUserNot", "");this.put("slUser", null);return this;};
 		/** not .... */
 		public M slUserNot(){if(proxy)return proxy().slUserNot();this.put("slUserNot", "not");return this;};
 		public M slUserNotNull(){if(proxy)return proxy().slUserNotNull();this.put("slUserNot", "not");this.put("slUser", null);return this;};
 		public M slUserNot(Object slUser){if(proxy)return proxy().slUserNot(slUser);this.put("slUserNot", "not");this.put("slUser", slUser);return this;};
		public M slUserIn(String ids){
			if(proxy)return proxy().slUserIn(ids);  this.put("slUserIn", ids);return this;
		};	
		/** 模块类名        **/
		public M slClass(Object slClass){if(proxy)return proxy().slClass(slClass);  this.put("slClass", slClass);return this;};
	 	/** and sl_class is null */
 		public M slClassNull(){if(proxy)return proxy().slClassNull();if(this.get("slClassNot")==null)this.put("slClassNot", "");this.put("slClass", null);return this;};
 		/** not .... */
 		public M slClassNot(){if(proxy)return proxy().slClassNot();this.put("slClassNot", "not");return this;};
 		public M slClassNotNull(){if(proxy)return proxy().slClassNotNull();this.put("slClassNot", "not");this.put("slClass", null);return this;};
 		public M slClassNot(Object slClass){if(proxy)return proxy().slClassNot(slClass);this.put("slClassNot", "not");this.put("slClass", slClass);return this;};
		/** 数据ID        **/
		public M slRelate(Object slRelate){if(proxy)return proxy().slRelate(slRelate);  this.put("slRelate", slRelate);return this;};
	 	/** and sl_relate is null */
 		public M slRelateNull(){if(proxy)return proxy().slRelateNull();if(this.get("slRelateNot")==null)this.put("slRelateNot", "");this.put("slRelate", null);return this;};
 		/** not .... */
 		public M slRelateNot(){if(proxy)return proxy().slRelateNot();this.put("slRelateNot", "not");return this;};
 		public M slRelateNotNull(){if(proxy)return proxy().slRelateNotNull();this.put("slRelateNot", "not");this.put("slRelate", null);return this;};
 		public M slRelateNot(Object slRelate){if(proxy)return proxy().slRelateNot(slRelate);this.put("slRelateNot", "not");this.put("slRelate", slRelate);return this;};
		/** and sl_relate <= ? */
		public M slRelateMin(Object min){if(proxy)return proxy().slRelateMin(min);this.put("slRelateMin", min);return this;};
		/** and sl_relate >= ? */
		public M slRelateMax(Object max){if(proxy)return proxy().slRelateMax(max);this.put("slRelateMax", max);return this;};
		public M slRelateIn(String ids){
			if(proxy)return proxy().slRelateIn(ids);  this.put("slRelateIn", ids);return this;
		};	
		/** 数据状态        **/
		public M slDetail(Object slDetail){if(proxy)return proxy().slDetail(slDetail);  this.put("slDetail", slDetail);return this;};
	 	/** and sl_detail is null */
 		public M slDetailNull(){if(proxy)return proxy().slDetailNull();if(this.get("slDetailNot")==null)this.put("slDetailNot", "");this.put("slDetail", null);return this;};
 		/** not .... */
 		public M slDetailNot(){if(proxy)return proxy().slDetailNot();this.put("slDetailNot", "not");return this;};
 		public M slDetailNotNull(){if(proxy)return proxy().slDetailNotNull();this.put("slDetailNot", "not");this.put("slDetail", null);return this;};
 		public M slDetailNot(Object slDetail){if(proxy)return proxy().slDetailNot(slDetail);this.put("slDetailNot", "not");this.put("slDetail", slDetail);return this;};
		/** 操作时间 [非空]       **/
		public M slAddTime(Object slAddTime){if(proxy)return proxy().slAddTime(slAddTime);  this.put("slAddTime", slAddTime);return this;};
	 	/** and sl_add_time is null */
 		public M slAddTimeNull(){if(proxy)return proxy().slAddTimeNull();if(this.get("slAddTimeNot")==null)this.put("slAddTimeNot", "");this.put("slAddTime", null);return this;};
 		/** not .... */
 		public M slAddTimeNot(){if(proxy)return proxy().slAddTimeNot();this.put("slAddTimeNot", "not");return this;};
 		public M slAddTimeNotNull(){if(proxy)return proxy().slAddTimeNotNull();this.put("slAddTimeNot", "not");this.put("slAddTime", null);return this;};
 		public M slAddTimeNot(Object slAddTime){if(proxy)return proxy().slAddTimeNot(slAddTime);this.put("slAddTimeNot", "not");this.put("slAddTime", slAddTime);return this;};
 		/** and sl_add_time >= ? */
 		public M slAddTimeStart(Object start){if(proxy)return proxy().slAddTimeStart(start);this.put("slAddTimeStart", start);return this;};			
 		/** and sl_add_time <= ? */
 		public M slAddTimeEnd(Object end){if(proxy)return proxy().slAddTimeEnd(end);this.put("slAddTimeEnd", end);return this;};
	 	public M add(String key, Object value) {if(proxy)return proxy().add(key,value);this.put(key, value);return this;}
	 	public M add(F key, Object value) {if(proxy)return proxy().add(key,value);this.put(key.toString(), value);return this;}
	 	public M desc(String key) {if(proxy)return proxy().desc(key);this.put("desc", key.toString());return this;}
	 	public M asc(String key) {if(proxy)return proxy().asc(key);this.put("asc", key.toString());return this;}
	 	/** 获取所有系统日志 **/
		public @api List<SrvLog> list(Integer size){			
			return getSrvLogList(this,size);
		}
		/** 获取系统日志分页 **/
		public @api Page<SrvLog> page(Integer page,Integer size){			
			return getSrvLogPage(page, size , this);
		}
		/** 根据查询条件取系统日志 **/
		public @api SrvLog get(){			
			return getSrvLog(this);
		}
		/** 获取系统日志数 **/
		public @api Long count(){			
			return getSrvLogCount(this);
		}
		/** 获取系统日志表达式 **/
		public @api <T> T eval(String strEval){			
			return getSrvLogEval(strEval,this);
		}
		/** 根据条件更新 **/
		public @api int update(){			
			M where = null;
			M set = null;
			if(this.type==0){
				if(this.linked==null)throw new RuntimeException("未发set");
				where = this;
				set = this.linked;
			}else{
				if(this.linked==null)throw new RuntimeException("未发where条件");
				set = this;
				where = this.linked;
			}
			return updateSrvLog(set,where);
		}
		/** 根据条件删除 **/
		public @api void delete(){			
			deleteSrvLog(this);
		}
	}
	
	public static class Param extends M{
		public Param(int type) {
			super(type);
		}
		public Param(int type, Boolean proxy) {
			super(type, proxy);
		}
	}
	
	/** 对象的字段描述 **/
	public static class F{
		/** 编号 [非空]       **/
		public final static @type(Long.class)  String slId="slId";
		/** 域  [SrvHost]      **/
		public final static @type(Long.class)  String slHost="slHost";
		/** 操作名称 [非空]       **/
		public final static @type(String.class) @like String slName="slName";
		/** 操作模块  [SrvProperty]     model_class:系统数据模型类 **/
		public final static @type(Long.class)  String slModel="slModel";
		/** 操作类型  [SrvProperty]     log_type:日志操作类型 **/
		public final static @type(Long.class)  String slType="slType";
		/** 操作人 [非空] [SrvUser]      **/
		public final static @type(Long.class)  String slUser="slUser";
		/** 模块类名        **/
		public final static @type(String.class)  String slClass="slClass";
		/** 数据ID        **/
		public final static @type(Long.class)  String slRelate="slRelate";
		/** and sl_relate >= ? */
		public final static @type(Long.class) String slRelateMin="slRelateMin";
		/** and sl_relate <= ? */
		public final static @type(Long.class) String slRelateMax="slRelateMax";
		/** 数据状态        **/
		public final static @type(String.class) @like String slDetail="slDetail";
		/** 操作时间 [非空]       **/
		public final static @type(Date.class)  String slAddTime="slAddTime";
	 	/** and sl_add_time >= ? */
 		public final static @type(Date.class) String slAddTimeStart="slAddTimeStart";
 		/** and sl_add_time <= ? */
 		public final static @type(Date.class) String slAddTimeEnd="slAddTimeEnd";
	 	public static String get(String name){
			try {
				Field field = F.class.getField(name);
				if(field!=null)
					return field.get(null).toString();
			} catch (Exception e) {
				//e.printStackTrace();
			}
			return null;
		}
	}
	
	
	
	/**
	* 获取系统日志数据
	**/
	public static Object getData(Object param){
		if(param==null)
			return null;
		Object value = null;
		if(param.getClass()==Long.class)
			value = SrvLog.get((Long)param);
		else if(param instanceof java.util.Map){
			java.util.Map params = (Map) param;
			if(params.get("size")==null)
				value = SrvLog.getSrvLog(params);
			else
				value = SrvLog.getSrvLogList(params, (Integer) params.get("size"));
		}else if(param.getClass()==Long.class )
			value =  SrvLog.where().slId(param).get();
		else if(!Utils.empty(param.toString()))
			value = SrvLog.get(Long.valueOf(param.toString()));
		return value;
	}
	
	/**对象转json**/
	public Map toJSON(){
		return toJSON(false);
	}
	public Map toJSON(boolean simple){
		Map map = new HashMap();
		map.put("id",this.getSlId());
		Utils.fms(map,simple?"id":"slId",this.getSlId(),this.getSlId$());
		Utils.fms(map,simple?"host":"slHost",this.getSlHost(),this.getSlHost$());
		Utils.fms(map,simple?"name":"slName",this.getSlName(),this.getSlName$());
		Utils.fms(map,simple?"model":"slModel",this.getSlModel(),this.getSlModel$());
		Utils.fms(map,simple?"type":"slType",this.getSlType(),this.getSlType$());
		Utils.fms(map,simple?"user":"slUser",this.getSlUser(),this.getSlUser$());
		Utils.fms(map,simple?"class":"slClass",this.getSlClass(),this.getSlClass$());
		Utils.fms(map,simple?"relate":"slRelate",this.getSlRelate(),this.getSlRelate$());
		Utils.fms(map,simple?"detail":"slDetail",this.getSlDetail(),this.getSlDetail$());
		Utils.fms(map,simple?"addTime":"slAddTime",this.getSlAddTime(),this.getSlAddTime$());
		if(this.suffix!=null)map.put("suffix", this.suffix);
		/************LAZY3Q_DEFINE_TOJSON************/
		/************LAZY3Q_DEFINE_TOJSON************/
		return map;
	}
	/**对象转map**/
	public Map toMap(){
		Map map = new HashMap();
		map.put("slId",this.getSlId());
		map.put("slHost",this.getSlHost());
		map.put("slName",this.getSlName());
		map.put("slModel",this.getSlModel());
		map.put("slType",this.getSlType());
		map.put("slUser",this.getSlUser());
		map.put("slClass",this.getSlClass());
		map.put("slRelate",this.getSlRelate());
		map.put("slDetail",this.getSlDetail());
		map.put("slAddTime",this.getSlAddTime());
		map.put("suffix", this.suffix);
		/************LAZY3Q_DEFINE_TOMAP************/
		/************LAZY3Q_DEFINE_TOMAP************/
		return map;
	}
	/**map转对象**/
	public static SrvLog fromMap(Map map){
		SrvLog srvLog = new SrvLog();
		srvLog.slId = Utils.parseLong(map.get("slId"));
		srvLog.slHost = Utils.parseLong(map.get("slHost"));
		srvLog.slName = Utils.parseString(map.get("slName"));
		srvLog.slModel = Utils.parseLong(map.get("slModel"));
		srvLog.slType = Utils.parseLong(map.get("slType"));
		srvLog.slUser = Utils.parseLong(map.get("slUser"));
		srvLog.slClass = Utils.parseString(map.get("slClass"));
		srvLog.slRelate = Utils.parseLong(map.get("slRelate"));
		srvLog.slDetail = Utils.parseString(map.get("slDetail"));
		srvLog.slAddTime = Utils.parseDate(map.get("slAddTime"));
		return srvLog;
	}
	
	
	
	/**字段设置标记队列**/
	private Map<String,Boolean> seted=new HashMap();
	public Boolean getSeted(String key){
		return seted.get(key);
	}
	public void setSeted(String key){
		seted.put(key,true);
	}
	/**同步未set的字段**/
	public void mergeSet(SrvLog old){
		Field[] fields = this.getClass().getDeclaredFields();
		try {
			for(Field field:fields){
				String key = field.getName();
				if(seted.get(key)==null && field.getAnnotation(column.class)!=null){
					field.setAccessible(true);
					field.set(this, field.get(old));					
				}
			}
		} catch (Exception e) {
			throw new RuntimeException(e);
		}
	}
	
		
	/**自定义变量存储**/
	private Map values=new HashMap();
	public Map getValues(){
		return values;
	}
	public void setValues(String name,Object value){
		values.put(name,value);
	}
	
	/**分表时的表名后缀**/
	private String suffix;
	public String getSuffix() {
		return suffix;
	}
	public void setSuffix(String suffix) {
		this.suffix = suffix;
	}
	
	public static String getIcon(){
		return "/images/icons/2008825642250778013.png";
	}
	public static String getIconfont(){
		return "icon-fuzhi";
	}
	public static enum ACT{
		列表,详情
	};
	public static String getUrl(ACT act,SrvLog.M params){
		if(params==null)params=new SrvLog.M(0);
		params.remove("joins");
		params.remove("definexs");
		params.remove("distinct");
		String strUrl = "/admin/systematic/log.edit.html?";
		if(params.get("slId")!=null){
			strUrl+="&id="+Utils.encode(""+params.get("slId"),Utils.UTF8);
		}
		if(act==ACT.列表){
			strUrl = "/admin/systematic/log.html?1=1";
		}else if(act==ACT.详情){
			strUrl+="&edittype=detail";
		}		
		if(params!=null){
			for(Object key:params.keySet()){
				strUrl+="&"+key+"="+Utils.encode(""+params.get(key),Utils.UTF8)+"";
			}
		}
		return strUrl;
	}
	public String getDetailUrl(){
		return this.getUrl(ACT.详情, where.slId(this.getId()));
	}
	
	/**
	* 转跳到当前地址
	**/
	public static Protocol redirect(SrvLog.ACT act,SrvLog.M params){
		Protocol protocol = Protocol.create(true,null,"ACT_REDIRECT");
		protocol.set("url",SrvLog.getUrl(act, params));
		return protocol;
	}
	/**
	* 打开一个新的tab页面
	**/
	public static Protocol href(SrvLog.ACT act,SrvLog.M params){
		Protocol protocol = Protocol.create(true,null,"ACT_HREF");
		protocol.set("url",SrvLog.getUrl(act, params));
		protocol.set("title",act.name());
		return protocol;
	}
	/**
	* 显示一个消息框，并且关闭当前的对话框
	**/
	public static Protocol message(String message){
		Protocol protocol = Protocol.create(true,null,"ACT_MESSAGE");
		protocol.set("message",message);
		return protocol;
	}
	
	
	static com.distribute.framework.dao.ISrvLogDao getSrvLogDao(){
		return Utils.getBean("srvLogDao");
	};
	
}